<!-- Begin pref/email.tpl -->
<script language="javascript" type="text/javascript">
function f_cnf_email_del(p_usrid,p_gid,p_posnr)
{ldelim}
	if (confirm('{$lg->info_del_conf}'))
		window.location.href='?module=prefs&action=del_email&usrid='+p_usrid+'&gid='+p_gid+'&posnr='+p_posnr;
{rdelim}
</script>


<form method="post" action="?module=prefs&action=email">
{opentable}
{titlebar colspan=5 title=$title}
<tr>
	<td align="left" colspan=2>{$lg->default_email} <b>{$k_email}</b>.
	{$lg->email_pref_det} :
	<td>
</tr>
<tr class="sectiontableheader" align="center">
	<td align="left" width="15%">{$lg->group}</td>
	<td align="left">{$lg->email}</td>
</tr>
{if is_array($t_adra)}
	{foreach from=$t_adra key=tabix item=s_adra}
		{php}$class = rowcolor();{/php}
		<tr class="{php}print $class;{/php}" align="center">
			<td>
				<select name="gid{$tabix}" >
					<option value="">(Select.)</option>
				{foreach from=$t_group key=id item=s_groups}
					<option value="{$s_groups.gid}" {if $s_groups.gid eq $s_adra.gid} selected="selected"{/if}>{$s_groups.name}</option>
				{/foreach}
				</select>
				<input type="hidden"  name="gidold{$tabix}" value="{$s_adra.gid}" />
			</td>
			<td align="left" >				
				<input type="text"  name="email{$tabix}" value="{$s_adra.email}"  maxlength="65" size="65" />
				{if $s_adra.posnr > 0}
				<a href="#" onclick="f_cnf_email_del({$smarty.session.userid},{$s_adra.gid},{$s_adra.posnr});" >
					<img src="{$smarty.env.imgs.delete}" width="16" height="16" border="0" alt="Delete" />
				</a>
				<input type="hidden"  name="posnr{$tabix}" value="{$s_adra.posnr}" />
				{/if}
			</td>
		</tr>
	{/foreach}	
{else}
	<tr class="data"><td colspan="4">{$lg->no_data}</td></tr>
{/if}
<tr class="titlebar">
	<td colspan="2">
		<input type="submit" class="button" name="save" value={$lg->save} />
		<input type="submit" class="button" name="add" value={$lg->add}  />
	</td>
</tr>
</table>
</form>
<!-- End pref/email.tpl -->

